<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<title>Lexical Clusters</title>
<link href="../docs-assets/Breadcrumbs.css" rel="stylesheet" rev="stylesheet" type="text/css">
		<meta name="viewport" content="width=device-width initial-scale=1">
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<meta http-equiv="Content-Language" content="en-gb">

<link href="../docs-assets/Contents.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Progress.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Navigation.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Fonts.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Base.css" rel="stylesheet" rev="stylesheet" type="text/css">
<script>
function togglePopup(material_id) {
  var popup = document.getElementById(material_id);
  popup.classList.toggle("show");
}
</script>

<link href="../docs-assets/Popups.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Colours.css" rel="stylesheet" rev="stylesheet" type="text/css">
		
	</head>
	<body class="commentary-font">
		<nav role="navigation">
		<h1><a href="../index.html"><img src="../docs-assets/Inform.png" height=72> </a></h1>
<ul><li><a href="../index.html">home</a></li>
</ul><h2>Compiler</h2><ul>
<li><a href="../structure.html">structure</a></li>
<li><a href="../inbuildn.html">inbuild</a></li>
<li><a href="../inform7n.html">inform7</a></li>
<li><a href="../intern.html">inter</a></li>
<li><a href="../services.html">services</a></li>
<li><a href="../secrets.html">secrets</a></li>
</ul><h2>Other Tools</h2><ul>
<li><a href="../inblorbn.html">inblorb</a></li>
<li><a href="../inform6.html">inform6</a></li>
<li><a href="../inpolicyn.html">inpolicy</a></li>
</ul><h2>Resources</h2><ul>
<li><a href="../extensions.html">extensions</a></li>
<li><a href="../kits.html">kits</a></li>
</ul><h2>Repository</h2><ul>
<li><a href="https://github.com/ganelson/inform"><img src="../docs-assets/github.png" height=0> github</a></li>
</ul><h2>Related Projects</h2><ul>
<li><a href="https://github.com/ganelson/inweb"><img src="../docs-assets/github.png" height=0> inweb</a></li>
<li><a href="https://github.com/ganelson/intest"><img src="../docs-assets/github.png" height=0> intest</a></li>
</ul>
		</nav>
		<main role="main">
		<!-- Weave of 'Lexical Clusters' generated by inweb -->
<div class="breadcrumbs">
    <ul class="crumbs"><li><a href="../index.html">Home</a></li><li><a href="../services.html">Services</a></li><li><a href="index.html">inflections</a></li><li><a href="index.html#3">Chapter 3: Declension and Conjugation</a></li><li><b>Lexical Clusters</b></li></ul></div>
<p class="purpose">Lexical clusters are sets of noun or adjective forms, perhaps multiple or in multiple languages, which have in common that they share a meaning.</p>

<ul class="toc"><li><a href="3-lc2.html#SP1">&#167;1. Cluster</a></li><li><a href="3-lc2.html#SP5">&#167;5. Plural fixing</a></li><li><a href="3-lc2.html#SP6">&#167;6. Searching declensions</a></li></ul><hr class="tocbar">

<p class="commentary firstcommentary"><a id="SP1" class="paragraph-anchor"></a><b>&#167;1. Cluster.</b>A cluster is a linked list of declensions, annotated with linguistic roles. For
example, the cluster of forms for the common noun "man" might be:
</p>

<blockquote>
    <p>man (En, neuter singular), men (En, neuter plural), homme (Fr, masculine singular), hommes (Fr, masculine plural)</p>
</blockquote>

<p class="commentary">We will call each of these four an "individual form" of the cluster. Each of
the four is in turn given a declension into cases, but for English or indeed
French this doesn't really show. For German, it would be a different matter.
</p>

<p class="commentary">While this perhaps looks a little unstructured, that means that it doesn't
impose many assumptions about the language. A similarly pragmatic view is taken
by the XML frameworks used in the Lexical Markup Framework standard ISO 24613,
which it would be fairly easy to convert our <a href="3-lc2.html#SP1" class="internal">lexical_cluster</a> objects to.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">typedef</span><span class="plain-syntax"> </span><span class="reserved-syntax">struct</span><span class="plain-syntax"> </span><span class="reserved-syntax">lexical_cluster</span><span class="plain-syntax"> {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">struct</span><span class="plain-syntax"> </span><span class="identifier-syntax">linked_list</span><span class="plain-syntax"> *</span><span class="identifier-syntax">listed</span><span class="plain-syntax">; </span><span class="comment-syntax"> of </span><span class="extract"><span class="extract-syntax">individual_form</span></span>
<span class="plain-syntax">    </span><span class="identifier-syntax">CLASS_DEFINITION</span>
<span class="plain-syntax">} </span><span class="reserved-syntax">lexical_cluster</span><span class="plain-syntax">;</span>

<span class="reserved-syntax">typedef</span><span class="plain-syntax"> </span><span class="reserved-syntax">struct</span><span class="plain-syntax"> </span><span class="reserved-syntax">individual_form</span><span class="plain-syntax"> {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">struct</span><span class="plain-syntax"> </span><span class="reserved-syntax">declension</span><span class="plain-syntax"> </span><span class="identifier-syntax">declined</span><span class="plain-syntax">; </span><span class="comment-syntax"> text of form</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">CLASS_DEFINITION</span>
<span class="plain-syntax">} </span><span class="reserved-syntax">individual_form</span><span class="plain-syntax">;</span>
</pre>
<ul class="endnotetexts"><li>The structure lexical_cluster is private to this section.</li><li>The structure individual_form is private to this section.</li></ul>
<p class="commentary firstcommentary"><a id="SP2" class="paragraph-anchor"></a><b>&#167;2. </b>A cluster begins empty.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">lexical_cluster</span><span class="plain-syntax"> *</span><span class="function-syntax">Clusters::new</span><span class="plain-syntax">(</span><span class="reserved-syntax">void</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">lexical_cluster</span><span class="plain-syntax"> *</span><span class="identifier-syntax">forms</span><span class="plain-syntax"> = </span><span class="identifier-syntax">CREATE</span><span class="plain-syntax">(</span><span class="reserved-syntax">lexical_cluster</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">forms</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">listed</span><span class="plain-syntax"> = </span><span class="identifier-syntax">NEW_LINKED_LIST</span><span class="plain-syntax">(</span><span class="reserved-syntax">individual_form</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">forms</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP3" class="paragraph-anchor"></a><b>&#167;3. </b>The following can add either a single form, or a form and its plural(s):
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">individual_form</span><span class="plain-syntax"> *</span><span class="function-syntax">Clusters::add_one</span><button class="popup" onclick="togglePopup('usagePopup1')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup1">Usage of <span class="code-font"><span class="function-syntax">Clusters::add_one</span></span>:<br/><a href="3-lc2.html#SP3_1">&#167;3.1</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">lexical_cluster</span><span class="plain-syntax"> *</span><span class="identifier-syntax">forms</span><span class="plain-syntax">, </span><span class="identifier-syntax">wording</span><span class="plain-syntax"> </span><span class="identifier-syntax">W</span><span class="plain-syntax">,</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">NATURAL_LANGUAGE_WORDS_TYPE</span><span class="plain-syntax"> *</span><span class="identifier-syntax">nl</span><span class="plain-syntax">, </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">gender</span><span class="plain-syntax">, </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">number</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">nl</span><span class="plain-syntax"> = </span><a href="4-dl.html#SP1" class="function-link"><span class="function-syntax">DefaultLanguage::get</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">nl</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">individual_form</span><span class="plain-syntax"> *</span><span class="identifier-syntax">in</span><span class="plain-syntax"> = </span><span class="identifier-syntax">CREATE</span><span class="plain-syntax">(</span><span class="reserved-syntax">individual_form</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">in</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">declined</span><span class="plain-syntax"> = </span><a href="3-dcl.html#SP5" class="function-link"><span class="function-syntax">Declensions::of_noun</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">W</span><span class="plain-syntax">, </span><span class="identifier-syntax">nl</span><span class="plain-syntax">, </span><span class="identifier-syntax">gender</span><span class="plain-syntax">, </span><span class="identifier-syntax">number</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">ADD_TO_LINKED_LIST</span><span class="plain-syntax">(</span><span class="identifier-syntax">in</span><span class="plain-syntax">, </span><span class="reserved-syntax">individual_form</span><span class="plain-syntax">, </span><span class="identifier-syntax">forms</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">listed</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">in</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>

<span class="identifier-syntax">linked_list</span><span class="plain-syntax"> *</span><span class="function-syntax">Clusters::add</span><button class="popup" onclick="togglePopup('usagePopup2')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup2">Usage of <span class="code-font"><span class="function-syntax">Clusters::add</span></span>:<br/><a href="3-lc2.html#SP4">&#167;4</a>, <a href="3-lc2.html#SP4_1">&#167;4.1</a>, <a href="3-lc2.html#SP5">&#167;5</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">lexical_cluster</span><span class="plain-syntax"> *</span><span class="identifier-syntax">forms</span><span class="plain-syntax">, </span><span class="identifier-syntax">wording</span><span class="plain-syntax"> </span><span class="identifier-syntax">W</span><span class="plain-syntax">,</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">NATURAL_LANGUAGE_WORDS_TYPE</span><span class="plain-syntax"> *</span><span class="identifier-syntax">nl</span><span class="plain-syntax">, </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">gender</span><span class="plain-syntax">, </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">number</span><span class="plain-syntax">, </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">pluralise</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">linked_list</span><span class="plain-syntax"> *</span><span class="identifier-syntax">L</span><span class="plain-syntax"> = </span><span class="identifier-syntax">NEW_LINKED_LIST</span><span class="plain-syntax">(</span><span class="reserved-syntax">individual_form</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">individual_form</span><span class="plain-syntax"> *</span><span class="identifier-syntax">in</span><span class="plain-syntax"> = </span><a href="3-lc2.html#SP3" class="function-link"><span class="function-syntax">Clusters::add_one</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">forms</span><span class="plain-syntax">, </span><span class="identifier-syntax">W</span><span class="plain-syntax">, </span><span class="identifier-syntax">nl</span><span class="plain-syntax">, </span><span class="identifier-syntax">gender</span><span class="plain-syntax">, </span><span class="identifier-syntax">number</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">ADD_TO_LINKED_LIST</span><span class="plain-syntax">(</span><span class="identifier-syntax">in</span><span class="plain-syntax">, </span><span class="reserved-syntax">individual_form</span><span class="plain-syntax">, </span><span class="identifier-syntax">L</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">pluralise</span><span class="plain-syntax">) &amp;&amp; (</span><span class="identifier-syntax">number</span><span class="plain-syntax"> == </span><span class="constant-syntax">SINGULAR_NUMBER</span><span class="plain-syntax">)) </span><span class="named-paragraph-container code-font"><a href="3-lc2.html#SP3_1" class="named-paragraph-link"><span class="named-paragraph">Add plural forms as well</span><span class="named-paragraph-number">3.1</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">L</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP3_1" class="paragraph-anchor"></a><b>&#167;3.1. </b>The following makes all possible plurals and registers those too. (Note
that every instance gets a plural form: even something palpably unique, like
"the Koh-i-Noor diamond".) The plural dictionary supports multiple plurals,
so there may be any number of forms registered: for instance, the kind
"person" is registered with plurals "persons" and "people".
</p>

<p class="commentary"><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Add plural forms as well</span><span class="named-paragraph-number">3.1</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="reserved-syntax">plural_dictionary_entry</span><span class="plain-syntax"> *</span><span class="identifier-syntax">pde</span><span class="plain-syntax"> = </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">k</span><span class="plain-syntax"> = </span><span class="constant-syntax">0</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">do</span><span class="plain-syntax"> {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">k</span><span class="plain-syntax">++;</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">wording</span><span class="plain-syntax"> </span><span class="identifier-syntax">PW</span><span class="plain-syntax"> = </span><span class="identifier-syntax">EMPTY_WORDING</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">pde</span><span class="plain-syntax"> = </span><a href="2-plr.html#SP3" class="function-link"><span class="function-syntax">Pluralisation::make</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">W</span><span class="plain-syntax">, &amp;</span><span class="identifier-syntax">PW</span><span class="plain-syntax">, </span><span class="identifier-syntax">pde</span><span class="plain-syntax">, </span><span class="identifier-syntax">nl</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">Wordings::nonempty</span><span class="plain-syntax">(</span><span class="identifier-syntax">PW</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">LOGIF</span><span class="plain-syntax">(</span><span class="identifier-syntax">CONSTRUCTED_PLURALS</span><span class="plain-syntax">, </span><span class="string-syntax">"(%d) Plural of &lt;%W&gt;: &lt;%W&gt;\n"</span><span class="plain-syntax">, </span><span class="identifier-syntax">k</span><span class="plain-syntax">, </span><span class="identifier-syntax">W</span><span class="plain-syntax">, </span><span class="identifier-syntax">PW</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">individual_form</span><span class="plain-syntax"> *</span><span class="identifier-syntax">in</span><span class="plain-syntax"> = </span><a href="3-lc2.html#SP3" class="function-link"><span class="function-syntax">Clusters::add_one</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">forms</span><span class="plain-syntax">, </span><span class="identifier-syntax">PW</span><span class="plain-syntax">, </span><span class="identifier-syntax">nl</span><span class="plain-syntax">, </span><span class="identifier-syntax">gender</span><span class="plain-syntax">, </span><span class="constant-syntax">PLURAL_NUMBER</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">ADD_TO_LINKED_LIST</span><span class="plain-syntax">(</span><span class="identifier-syntax">in</span><span class="plain-syntax">, </span><span class="reserved-syntax">individual_form</span><span class="plain-syntax">, </span><span class="identifier-syntax">L</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">    } </span><span class="reserved-syntax">while</span><span class="plain-syntax"> (</span><span class="identifier-syntax">pde</span><span class="plain-syntax">);</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="3-lc2.html#SP3">&#167;3</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP4" class="paragraph-anchor"></a><b>&#167;4. </b>The following is more suited to adjectives, or to words which are used
adjectivally, such as past participles in French. This time we generate all
possible gender and number agreements.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">void</span><span class="plain-syntax"> </span><span class="function-syntax">Clusters::add_with_agreements</span><span class="plain-syntax">(</span><span class="reserved-syntax">lexical_cluster</span><span class="plain-syntax"> *</span><span class="identifier-syntax">cl</span><span class="plain-syntax">, </span><span class="identifier-syntax">wording</span><span class="plain-syntax"> </span><span class="identifier-syntax">W</span><span class="plain-syntax">,</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">NATURAL_LANGUAGE_WORDS_TYPE</span><span class="plain-syntax"> *</span><span class="identifier-syntax">nl</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">nl</span><span class="plain-syntax"> = </span><a href="4-dl.html#SP1" class="function-link"><span class="function-syntax">DefaultLanguage::get</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">nl</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">nl</span><span class="plain-syntax"> == </span><a href="4-dl.html#SP1" class="function-link"><span class="function-syntax">DefaultLanguage::get</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">NULL</span><span class="plain-syntax">))</span>
<span class="plain-syntax">        </span><a href="3-lc2.html#SP3" class="function-link"><span class="function-syntax">Clusters::add</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">cl</span><span class="plain-syntax">, </span><span class="identifier-syntax">W</span><span class="plain-syntax">, </span><span class="identifier-syntax">nl</span><span class="plain-syntax">, </span><span class="constant-syntax">NEUTER_GENDER</span><span class="plain-syntax">, </span><span class="constant-syntax">SINGULAR_NUMBER</span><span class="plain-syntax">, </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">else</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">for</span><span class="plain-syntax"> (</span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">form_number</span><span class="plain-syntax"> = </span><span class="constant-syntax">0</span><span class="plain-syntax">; </span><span class="identifier-syntax">form_number</span><span class="plain-syntax"> &lt; </span><span class="constant-syntax">NO_KNOWN_NUMBERS</span><span class="plain-syntax">; </span><span class="identifier-syntax">form_number</span><span class="plain-syntax">++)</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">for</span><span class="plain-syntax"> (</span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">form_gender</span><span class="plain-syntax"> = </span><span class="constant-syntax">1</span><span class="plain-syntax">; </span><span class="identifier-syntax">form_gender</span><span class="plain-syntax"> &lt; </span><span class="constant-syntax">NO_KNOWN_GENDERS</span><span class="plain-syntax">; </span><span class="identifier-syntax">form_gender</span><span class="plain-syntax">++)</span>
<span class="plain-syntax">                </span><span class="named-paragraph-container code-font"><a href="3-lc2.html#SP4_1" class="named-paragraph-link"><span class="named-paragraph">Generate agreement form and add to the declension</span><span class="named-paragraph-number">4.1</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP4_1" class="paragraph-anchor"></a><b>&#167;4.1. </b>We use tries to modify the base text, which is taken to be the neuter
singular form, into the other five forms.
</p>

<p class="commentary"><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Generate agreement form and add to the declension</span><span class="named-paragraph-number">4.1</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="identifier-syntax">nonterminal</span><span class="plain-syntax"> *</span><span class="identifier-syntax">step1</span><span class="plain-syntax"> = </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">, *</span><span class="identifier-syntax">step2</span><span class="plain-syntax"> = </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">switch</span><span class="plain-syntax"> (</span><span class="identifier-syntax">form_number</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">SINGULAR_NUMBER:</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">switch</span><span class="plain-syntax"> (</span><span class="identifier-syntax">form_number</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">                </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">NEUTER_GENDER:</span>
<span class="plain-syntax">                    </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">                </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">MASCULINE_GENDER:</span>
<span class="plain-syntax">                    </span><span class="identifier-syntax">step1</span><span class="plain-syntax"> = </span><span class="function-syntax">&lt;adjective-to-masculine-singular&gt;</span><span class="plain-syntax">; </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">                </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">FEMININE_GENDER:</span>
<span class="plain-syntax">                    </span><span class="identifier-syntax">step1</span><span class="plain-syntax"> = </span><span class="function-syntax">&lt;adjective-to-feminine-singular&gt;</span><span class="plain-syntax">; </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            }</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">PLURAL_NUMBER:</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">switch</span><span class="plain-syntax"> (</span><span class="identifier-syntax">form_number</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">                </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">NEUTER_GENDER:</span>
<span class="plain-syntax">                    </span><span class="identifier-syntax">step1</span><span class="plain-syntax"> = </span><span class="function-syntax">&lt;adjective-to-plural&gt;</span><span class="plain-syntax">; </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">                </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">MASCULINE_GENDER:</span>
<span class="plain-syntax">                    </span><span class="identifier-syntax">step1</span><span class="plain-syntax"> = </span><span class="function-syntax">&lt;adjective-to-masculine-singular&gt;</span><span class="plain-syntax">;</span>
<span class="plain-syntax">                    </span><span class="identifier-syntax">step2</span><span class="plain-syntax"> = </span><span class="function-syntax">&lt;adjective-to-masculine-plural&gt;</span><span class="plain-syntax">; </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">                </span><span class="reserved-syntax">case</span><span class="plain-syntax"> </span><span class="identifier-syntax">FEMININE_GENDER:</span>
<span class="plain-syntax">                    </span><span class="identifier-syntax">step1</span><span class="plain-syntax"> = </span><span class="function-syntax">&lt;adjective-to-feminine-singular&gt;</span><span class="plain-syntax">;</span>
<span class="plain-syntax">                    </span><span class="identifier-syntax">step2</span><span class="plain-syntax"> = </span><span class="function-syntax">&lt;adjective-to-feminine-plural&gt;</span><span class="plain-syntax">; </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            }</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">wording</span><span class="plain-syntax"> </span><span class="identifier-syntax">FW</span><span class="plain-syntax"> = </span><span class="identifier-syntax">EMPTY_WORDING</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="named-paragraph-container code-font"><a href="3-lc2.html#SP4_1_1" class="named-paragraph-link"><span class="named-paragraph">Process via the agreement trie in this pipeline</span><span class="named-paragraph-number">4.1.1</span></a></span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><a href="3-lc2.html#SP3" class="function-link"><span class="function-syntax">Clusters::add</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">cl</span><span class="plain-syntax">, </span><span class="identifier-syntax">FW</span><span class="plain-syntax">, </span><span class="identifier-syntax">nl</span><span class="plain-syntax">, </span><span class="identifier-syntax">form_gender</span><span class="plain-syntax">, </span><span class="identifier-syntax">form_number</span><span class="plain-syntax">, </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">);</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="3-lc2.html#SP4">&#167;4</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP4_1_1" class="paragraph-anchor"></a><b>&#167;4.1.1. </b>Not much of a pipeline, really: we start with the base case and work
through one or two tries.
</p>

<p class="commentary"><span class="named-paragraph-container code-font"><span class="named-paragraph-defn">Process via the agreement trie in this pipeline</span><span class="named-paragraph-number">4.1.1</span></span><span class="comment-syntax"> =</span>
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">    </span><span class="identifier-syntax">word_assemblage</span><span class="plain-syntax"> </span><span class="identifier-syntax">wa</span><span class="plain-syntax"> = </span><span class="identifier-syntax">WordAssemblages::from_wording</span><span class="plain-syntax">(</span><span class="identifier-syntax">W</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">step1</span><span class="plain-syntax">)</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">wa</span><span class="plain-syntax"> = </span><a href="2-tai.html#SP3" class="function-link"><span class="function-syntax">Inflect::first_word</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">wa</span><span class="plain-syntax">,</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">PreformUtilities::define_trie</span><span class="plain-syntax">(</span><span class="identifier-syntax">step1</span><span class="plain-syntax">, </span><span class="identifier-syntax">TRIE_END</span><span class="plain-syntax">,</span>
<span class="plain-syntax">                </span><a href="4-dl.html#SP1" class="function-link"><span class="function-syntax">DefaultLanguage::get</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">nl</span><span class="plain-syntax">)));</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">step2</span><span class="plain-syntax">)</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">wa</span><span class="plain-syntax"> = </span><a href="2-tai.html#SP3" class="function-link"><span class="function-syntax">Inflect::first_word</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">wa</span><span class="plain-syntax">,</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">PreformUtilities::define_trie</span><span class="plain-syntax">(</span><span class="identifier-syntax">step2</span><span class="plain-syntax">, </span><span class="identifier-syntax">TRIE_END</span><span class="plain-syntax">,</span>
<span class="plain-syntax">                </span><a href="4-dl.html#SP1" class="function-link"><span class="function-syntax">DefaultLanguage::get</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">nl</span><span class="plain-syntax">)));</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">FW</span><span class="plain-syntax"> = </span><span class="identifier-syntax">WordAssemblages::to_wording</span><span class="plain-syntax">(&amp;</span><span class="identifier-syntax">wa</span><span class="plain-syntax">);</span>
</pre>
<ul class="endnotetexts"><li>This code is used in <a href="3-lc2.html#SP4_1">&#167;4.1</a>.</li></ul>
<p class="commentary firstcommentary"><a id="SP5" class="paragraph-anchor"></a><b>&#167;5. Plural fixing.</b>Less elegantly, we can force the plural of a form in a cluster to a given
fixed text, overwriting it if it's already there. In practice this is done
only when the built-in kinds are being given plural forms; some of these
(those for kind constructors with optional wordings) have a peculiar format,
and wouldn't pass through the pluralising tries intact.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">void</span><span class="plain-syntax"> </span><span class="function-syntax">Clusters::set_plural_in_language</span><span class="plain-syntax">(</span><span class="reserved-syntax">lexical_cluster</span><span class="plain-syntax"> *</span><span class="identifier-syntax">cl</span><span class="plain-syntax">, </span><span class="identifier-syntax">wording</span><span class="plain-syntax"> </span><span class="identifier-syntax">W</span><span class="plain-syntax">,</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">NATURAL_LANGUAGE_WORDS_TYPE</span><span class="plain-syntax"> *</span><span class="identifier-syntax">nl</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">individual_form</span><span class="plain-syntax"> *</span><span class="identifier-syntax">in</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">LOOP_OVER_LINKED_LIST</span><span class="plain-syntax">(</span><span class="identifier-syntax">in</span><span class="plain-syntax">, </span><span class="reserved-syntax">individual_form</span><span class="plain-syntax">, </span><span class="identifier-syntax">cl</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">listed</span><span class="plain-syntax">)</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><a href="3-lc2.html#SP9" class="function-link"><span class="function-syntax">Clusters::get_number_of_form</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">in</span><span class="plain-syntax">) == </span><span class="constant-syntax">PLURAL_NUMBER</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">in</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">declined</span><span class="plain-syntax"> = </span><a href="3-dcl.html#SP5" class="function-link"><span class="function-syntax">Declensions::of_noun</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">W</span><span class="plain-syntax">, </span><span class="identifier-syntax">nl</span><span class="plain-syntax">, </span><span class="constant-syntax">NEUTER_GENDER</span><span class="plain-syntax">, </span><span class="constant-syntax">PLURAL_NUMBER</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">return</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">    </span><a href="3-lc2.html#SP3" class="function-link"><span class="function-syntax">Clusters::add</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">cl</span><span class="plain-syntax">, </span><span class="identifier-syntax">W</span><span class="plain-syntax">, </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">, </span><span class="constant-syntax">NEUTER_GENDER</span><span class="plain-syntax">, </span><span class="constant-syntax">PLURAL_NUMBER</span><span class="plain-syntax">, </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">);</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP6" class="paragraph-anchor"></a><b>&#167;6. Searching declensions.</b>These are always quite small, so there's no need for any efficient device
to search them.
</p>

<p class="commentary">The first routine finds the earliest form with the correct number (singular
or plural):
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="identifier-syntax">wording</span><span class="plain-syntax"> </span><span class="function-syntax">Clusters::get_form</span><button class="popup" onclick="togglePopup('usagePopup3')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup3">Usage of <span class="code-font"><span class="function-syntax">Clusters::get_form</span></span>:<br/><a href="3-lc2.html#SP7">&#167;7</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">lexical_cluster</span><span class="plain-syntax"> *</span><span class="identifier-syntax">cl</span><span class="plain-syntax">, </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">plural_flag</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">number_sought</span><span class="plain-syntax"> = </span><span class="constant-syntax">SINGULAR_NUMBER</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">plural_flag</span><span class="plain-syntax">) </span><span class="identifier-syntax">number_sought</span><span class="plain-syntax"> = </span><span class="constant-syntax">PLURAL_NUMBER</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">individual_form</span><span class="plain-syntax"> *</span><span class="identifier-syntax">in</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">LOOP_OVER_LINKED_LIST</span><span class="plain-syntax">(</span><span class="identifier-syntax">in</span><span class="plain-syntax">, </span><span class="reserved-syntax">individual_form</span><span class="plain-syntax">, </span><span class="identifier-syntax">cl</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">listed</span><span class="plain-syntax">)</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><a href="3-lc2.html#SP9" class="function-link"><span class="function-syntax">Clusters::get_number_of_form</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">in</span><span class="plain-syntax">) == </span><span class="identifier-syntax">number_sought</span><span class="plain-syntax">)</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><a href="3-lc2.html#SP9" class="function-link"><span class="function-syntax">Clusters::get_nominative_of_form</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">in</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">EMPTY_WORDING</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP7" class="paragraph-anchor"></a><b>&#167;7. </b>The following variant finds the earliest form in the language of play,
falling back on English if there's none registered:
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="identifier-syntax">wording</span><span class="plain-syntax"> </span><span class="function-syntax">Clusters::get_form_in_language</span><span class="plain-syntax">(</span><span class="reserved-syntax">lexical_cluster</span><span class="plain-syntax"> *</span><span class="identifier-syntax">cl</span><span class="plain-syntax">, </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">plural_flag</span><span class="plain-syntax">,</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">NATURAL_LANGUAGE_WORDS_TYPE</span><span class="plain-syntax"> *</span><span class="identifier-syntax">nl</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">number_sought</span><span class="plain-syntax"> = </span><span class="constant-syntax">SINGULAR_NUMBER</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">plural_flag</span><span class="plain-syntax">) </span><span class="identifier-syntax">number_sought</span><span class="plain-syntax"> = </span><span class="constant-syntax">PLURAL_NUMBER</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">individual_form</span><span class="plain-syntax"> *</span><span class="identifier-syntax">in</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">LOOP_OVER_LINKED_LIST</span><span class="plain-syntax">(</span><span class="identifier-syntax">in</span><span class="plain-syntax">, </span><span class="reserved-syntax">individual_form</span><span class="plain-syntax">, </span><span class="identifier-syntax">cl</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">listed</span><span class="plain-syntax">)</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><a href="3-lc2.html#SP9" class="function-link"><span class="function-syntax">Clusters::get_number_of_form</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">in</span><span class="plain-syntax">) == </span><span class="identifier-syntax">number_sought</span><span class="plain-syntax">) &amp;&amp;</span>
<span class="plain-syntax">            (</span><a href="3-lc2.html#SP8" class="function-link"><span class="function-syntax">Clusters::language_of_form</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">in</span><span class="plain-syntax">) == </span><span class="identifier-syntax">nl</span><span class="plain-syntax">))</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><a href="3-lc2.html#SP9" class="function-link"><span class="function-syntax">Clusters::get_nominative_of_form</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">in</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><a href="3-lc2.html#SP6" class="function-link"><span class="function-syntax">Clusters::get_form</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">cl</span><span class="plain-syntax">, </span><span class="identifier-syntax">plural_flag</span><span class="plain-syntax">);</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP8" class="paragraph-anchor"></a><b>&#167;8. </b>A more specific search, which can optionally test for number and gender.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="identifier-syntax">wording</span><span class="plain-syntax"> </span><span class="function-syntax">Clusters::get_form_general</span><span class="plain-syntax">(</span><span class="reserved-syntax">lexical_cluster</span><span class="plain-syntax"> *</span><span class="identifier-syntax">cl</span><span class="plain-syntax">,</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">NATURAL_LANGUAGE_WORDS_TYPE</span><span class="plain-syntax"> *</span><span class="identifier-syntax">nl</span><span class="plain-syntax">, </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">number_sought</span><span class="plain-syntax">, </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">gender_sought</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">individual_form</span><span class="plain-syntax"> *</span><span class="identifier-syntax">in</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">LOOP_OVER_LINKED_LIST</span><span class="plain-syntax">(</span><span class="identifier-syntax">in</span><span class="plain-syntax">, </span><span class="reserved-syntax">individual_form</span><span class="plain-syntax">, </span><span class="identifier-syntax">cl</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">listed</span><span class="plain-syntax">)</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (((</span><span class="identifier-syntax">number_sought</span><span class="plain-syntax"> == -1) || (</span><span class="identifier-syntax">number_sought</span><span class="plain-syntax"> == </span><a href="3-lc2.html#SP9" class="function-link"><span class="function-syntax">Clusters::get_number_of_form</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">in</span><span class="plain-syntax">))) &amp;&amp;</span>
<span class="plain-syntax">            ((</span><span class="identifier-syntax">gender_sought</span><span class="plain-syntax"> == -1) || (</span><span class="identifier-syntax">gender_sought</span><span class="plain-syntax"> == </span><a href="3-lc2.html#SP9" class="function-link"><span class="function-syntax">Clusters::get_gender_of_form</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">in</span><span class="plain-syntax">))) &amp;&amp;</span>
<span class="plain-syntax">            (</span><a href="3-lc2.html#SP8" class="function-link"><span class="function-syntax">Clusters::language_of_form</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">in</span><span class="plain-syntax">) == </span><span class="identifier-syntax">nl</span><span class="plain-syntax">))</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><a href="3-lc2.html#SP9" class="function-link"><span class="function-syntax">Clusters::get_nominative_of_form</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">in</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">EMPTY_WORDING</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>

<span class="identifier-syntax">NATURAL_LANGUAGE_WORDS_TYPE</span><span class="plain-syntax"> *</span><span class="function-syntax">Clusters::language_of_form</span><button class="popup" onclick="togglePopup('usagePopup4')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup4">Usage of <span class="code-font"><span class="function-syntax">Clusters::language_of_form</span></span>:<br/><a href="3-lc2.html#SP7">&#167;7</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">individual_form</span><span class="plain-syntax"> *</span><span class="identifier-syntax">in</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">in</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">declined</span><span class="plain-syntax">.</span><span class="element-syntax">within_language</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP9" class="paragraph-anchor"></a><b>&#167;9. </b>All of which use:
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="identifier-syntax">wording</span><span class="plain-syntax"> </span><span class="function-syntax">Clusters::get_nominative_of_form</span><button class="popup" onclick="togglePopup('usagePopup5')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup5">Usage of <span class="code-font"><span class="function-syntax">Clusters::get_nominative_of_form</span></span>:<br/><a href="3-lc2.html#SP6">&#167;6</a>, <a href="3-lc2.html#SP7">&#167;7</a>, <a href="3-lc2.html#SP8">&#167;8</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">individual_form</span><span class="plain-syntax"> *</span><span class="identifier-syntax">in</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><a href="3-dcl.html#SP4" class="function-link"><span class="function-syntax">Declensions::in_case</span></a><span class="plain-syntax">(&amp;(</span><span class="identifier-syntax">in</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">declined</span><span class="plain-syntax">), </span><span class="constant-syntax">NOMINATIVE_CASE</span><span class="plain-syntax">);</span>
<span class="plain-syntax">}</span>

<span class="constant-syntax">lcon_ti</span><span class="plain-syntax"> </span><span class="function-syntax">Clusters::get_lcon_of_form</span><span class="plain-syntax">(</span><span class="reserved-syntax">individual_form</span><span class="plain-syntax"> *</span><span class="identifier-syntax">in</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">in</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">declined</span><span class="plain-syntax">.</span><span class="element-syntax">lcon_cased</span><span class="plain-syntax">[</span><span class="constant-syntax">NOMINATIVE_CASE</span><span class="plain-syntax">];</span>
<span class="plain-syntax">}</span>

<span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="function-syntax">Clusters::get_number_of_form</span><button class="popup" onclick="togglePopup('usagePopup6')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup6">Usage of <span class="code-font"><span class="function-syntax">Clusters::get_number_of_form</span></span>:<br/><a href="3-lc2.html#SP5">&#167;5</a>, <a href="3-lc2.html#SP6">&#167;6</a>, <a href="3-lc2.html#SP7">&#167;7</a>, <a href="3-lc2.html#SP8">&#167;8</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">individual_form</span><span class="plain-syntax"> *</span><span class="identifier-syntax">in</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><a href="3-lc.html#SP9" class="function-link"><span class="function-syntax">Lcon::get_number</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">in</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">declined</span><span class="plain-syntax">.</span><span class="element-syntax">lcon_cased</span><span class="plain-syntax">[</span><span class="constant-syntax">NOMINATIVE_CASE</span><span class="plain-syntax">]);</span>
<span class="plain-syntax">}</span>

<span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="function-syntax">Clusters::get_gender_of_form</span><button class="popup" onclick="togglePopup('usagePopup7')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup7">Usage of <span class="code-font"><span class="function-syntax">Clusters::get_gender_of_form</span></span>:<br/><a href="3-lc2.html#SP8">&#167;8</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">individual_form</span><span class="plain-syntax"> *</span><span class="identifier-syntax">in</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><a href="3-lc.html#SP9" class="function-link"><span class="function-syntax">Lcon::get_gender</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">in</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">declined</span><span class="plain-syntax">.</span><span class="element-syntax">lcon_cased</span><span class="plain-syntax">[</span><span class="constant-syntax">NOMINATIVE_CASE</span><span class="plain-syntax">]);</span>
<span class="plain-syntax">}</span>

</pre>
<nav role="progress"><div class="progresscontainer">
    <ul class="progressbar"><li class="progressprev"><a href="3-lc.html">&#10094;</a></li><li class="progresschapter"><a href="P-wtmd.html">P</a></li><li class="progresschapter"><a href="1-im.html">1</a></li><li class="progresschapter"><a href="2-tai.html">2</a></li><li class="progresscurrentchapter">3</li><li class="progresssection"><a href="3-lc.html">lc</a></li><li class="progresscurrent">lc2</li><li class="progresssection"><a href="3-dcl.html">dcl</a></li><li class="progresssection"><a href="3-vc.html">vc</a></li><li class="progresschapter"><a href="4-dl.html">4</a></li><li class="progressnext"><a href="3-dcl.html">&#10095;</a></li></ul></div>
</nav><!-- End of weave -->

		</main>
	</body>
</html>

